
#ifndef __BASE_TYPE_DEF_H__
#define __BASE_TYPE_DEF_H__ 1

#ifdef _WIN32

#ifdef WINCE
#define WINVER _WIN32_WCE
#else
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#endif

//#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#ifndef HDEV_DEF
typedef HANDLE	HDEV;
#endif

#else /* linux */

typedef int		HDEV;
typedef void*	HANDLE;

#define _GNU_SOURCE
#define __USE_GNU

#endif

typedef unsigned char	u8;
typedef unsigned short	u16;
typedef unsigned long	u32;

/* Standard typedefs - to retain compatibility with TDMA */
typedef u8           		 BYTE;         			/* Unsigned 8-bit quantity        */
typedef u8            		 UBYTE;        			/* Unsigned 8-bit quantity        */
typedef u16          		 UWORD;        			/* Unsigned 16-bit quantity       */
typedef u16          		 WORD;         			/* Unsigned 16-bit quantity       */
typedef u16           		 SWORD;        			/* Signed 16-bit quantity         */
typedef u32                 DWORD;        			/* Unsigned 32-bit quantity       */
typedef unsigned long long     UINT64;                /* Unsigned 64-bit quantity       */
typedef void* 		         VOID_PTR;

#ifndef FALSE
#define FALSE               0
#endif

#ifndef TRUE
#define TRUE                1
#endif

typedef char CHAR;
typedef unsigned long ULONG;
typedef unsigned char       BYTE;
typedef int  BOOL;
typedef CHAR * LPSTR;

#include <xchar.h>

#endif /* __BASE_TYPE_DEF_H__ */
